package denkmalVerwaltungstool.backend.tokenizer.token;

public class Tokenlist {

	private Token head;
	private Token tail;
	
	public static final int UNKNOWN = 0; 
	public static final int MONUMENT_ID = 1;
	public static final int ADDRESS=2;
	public static final int STREET = 3;
	public static final int HOUSENUMBER = 4;
	public static final int BUILDINGTYPE = 5;
	public static final int DISTRICT = 6;
	public static final int QUARTER = 7;
	public static final int DATE=8;
	
	public Tokenlist() {
		super();
		
		
	}
	
	public void addToken(String content){
		if (head == null){
			this.head = new Token(content, null, null);
			this.tail = this.head;
		}
		else
		{
			Token temp = new Token(content, tail, null);
			this.tail.setNext(temp);
			this.tail = temp;
		}
	}
	
	public String toString(){
		Token tmp=head;
		String result = new String();
		while (tmp != tail)
		{
			result.concat(tmp.toString());
			
		}
		return result;
	}
	
}
